#pragma once

class System_Console
{
	/* List of Subscibers */
	std::map <std::string,  Console_Subscriber *> mSubscribers;
	/* Graphical Display */
	bool						mbRender;
	Vector2D					Position;
	Vector2D					InputPosition;
	Vector2D					OutputPosition;

	hgeQuad						FullScreenQuad;

	SmartPtr <hgeFont>			Font;
	std::deque<std :: string>	Log;
	std::string					CurrentText;
public:	
	System_Console(float Width, float Height);
	~System_Console();

	inline bool Visible() const { return mbRender; }
	inline void SetVisible(bool state) { mbRender = state; }
	bool Subscribe(Console_Subscriber * Address);
	bool UnSubscribe(Console_Subscriber * Address);

	virtual void OnOffConsole();
	virtual void FeedTextLog(std :: string Text);
	virtual void ProcessInput();
	virtual void Update(const float & Interval);
	virtual void ParseCommand();
	virtual void Render();
};

extern SmartPtr <System_Console> g_pSystem_Console;